package com.daohang361.imqq.Asycore;

import org.apache.log4j.Logger;
/**
 * 用于格式打印16进制，记录日志到文件的方法
 * @author naner
 */
public class MyLoger {
	public static Logger log = Logger.getLogger(MyLoger.class);
	public static void printByteToHex(String recive)
	{
		recive=recive.replace(" ", "");
		for (int j = 0; j < recive.length(); j+=2) {
			System.out.print(recive.substring(j,j+2)+" ");
			if ((j + 2) % 32 == 0)
				System.out.print("\n");
		}
		System.out.print("\n");
	}
	
	
	public static void writeLog(String s){
		log.info(s);
	}
}
